﻿using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using DLL;

namespace Website
{
    public partial class _Default : System.Web.UI.Page
    {
        DALClass DataAccessLayer;
        DataSet personDataSet;
        TextBox[] headerTextBoxes;

        protected void Page_Load(object sender, EventArgs e)
        {
            this.headerTextBoxes = new TextBox[]
        {
            this.TextBox0,
            this.TextBox1,
            this.TextBox2,
            
        };

            // this.DataAccessLayer = new DLL();

            // this.personDataSet = this.DataAccessLayer.GetAllPersons();

            // this.BookGridView.DataSource = this.personDataSet;
            // this.BookGridView.DataBind();
        }
        protected void BookGridView_SelectedIndexChanged(object sender, EventArgs e)
        {
            int i = 0;
            foreach (TableCell column in this.BookGridView.SelectedRow.Cells)
            {
                if (i >= 2)
                {
                    if (column.Text == "&nbsp;")
                        this.headerTextBoxes[i - 2].Text = "нет данных";
                    else
                        this.headerTextBoxes[i - 2].Text = column.Text;
                }
                i++;
            }
        }
        protected void BookGridView_SelectedIndexChanging(object sender, EventArgs e)
        { }
   
    }
}
